<% layout('/layouts/default.html', {title: '进货统计管理', libs: ['dataGrid']}){ %>
<div class="main-content">
	<div class="box box-main">
		<div class="box-header">
			<div class="box-title">
				<i class="fa fa-list-alt"></i> ${text('进货统计管理')}
			</div>
			<div class="box-tools pull-right">
			</div>
		</div>
		<div class="box-body">
			<#form:form id="searchForm" model="${phoneCommodity}" action="${ctx}/phone/phoneCommodity/commodityDaylistData" method="post" class="form-inline hide"
					data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
			<div class="form-group" style="display: none;">
				<label class="control-label">年份：</label>
				<div class="control-inline">
					<#form:input path="productManufacturerId" maxlength="11" class="form-control width-120"/>
				</div>
			</div>
			</#form:form>
			<table id="dataGrid"></table>
			<div id="dataGridPage"></div>
		</div>
	</div>
</div>
<% } %>
<script>
// 初始化DataGrid对象
$('#dataGrid').dataGrid({
	searchForm: $("#searchForm"),
	columnModel: [
		{header:'产品厂商', name:'productManufacturer', index:'m.productManufacturer', width:150, align:"left", frozen:true},
		{header:'商品名称', name:'commodityName', index:'m.commodity_name', width:150, align:"left"},
		{header:'型号-款号', name:'sytleNumber', index:'m.sytle_number', width:150, align:"left"},
		{header:'单价', name:'price', index:'a.price', width:150, align:"right", formatter: function(val, obj, row, act){
				return js.formatNumber(val, 2, false, ''); // 数值类型格式化 (原始数值, 小数位数, 是否千分位, 默认值，金额情况下设置0.00);
			}},
		{header:'数量', name:'number', index:'m.number', width:150, align:"center"},
		{header:'总金额', name:'totalPrice', index:'a.total_price', width:150, align:"right", formatter: function(val, obj, row, act){
				return js.formatNumber(val, 2, false, ''); // 数值类型格式化 (原始数值, 小数位数, 是否千分位, 默认值，金额情况下设置0.00);
			}},
		{header:'进货日期', name:'purchaseTime', index:'a.purchase_time', width:150, align:"center"},
		{header:'业务员编号', name:'salesmanCode', index:'a.salesman_code', width:150, align:"center"},
	],
	// 加载成功后执行事件
	ajaxSuccess: function(data){
		
	}
});
</script>